import {Loading} from "element-ui";

const loadOption = {
    fullscreen: true,
    lock: true,
    loading: 'Loading',
    spinner: 'el-icon-loading',
    background:"rgba(0,0,0,0.7)"
};

let loadingInstance ;

export default class loadEvents {
    constructor(vueThis) {
        this.vm = vueThis;// vue 实例中的this ，可以不用
    }
    open(){
        loadingInstance = Loading.service(loadOption)
    }
    close(){
        loadingInstance.close();
    }
}
